package com.skcc.cip.ngms.mail.processor;

import java.util.Iterator;
import java.util.Map;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;

import com.skcc.cip.component.exchange.dto._2007.PushSubscribeRequest;
import com.skcc.cip.component.exchange.dto._2007.jaxb.mail.mailpushsubscribe.Response;
import com.skcc.cip.ngms.common.NMPConstant;
import com.skcc.cip.ngms.converter.MailTransform;

//DB 사용안할때 임시코딩
public class MailNotificationList implements Processor{

	public void process(Exchange exchange) throws Exception {
//
//		Response response =exchange.getIn().getBody(Response.class);
//		if(NMPConstant.PUSH_SUBSCRIBE_RESULT_NO_ERROR.equals(response.getMetaInfo().getResultMessage())){
//			Map<String, Object> headers = exchange.getIn().getHeaders();
//			String user = (String)headers.get("authUser");
//			
//			if(MailTransform.subscribeList.containsValue((String)headers.get("authUser"))){
//				Iterator<String> iter = MailTransform.subscribeList.keySet().iterator();
//				 while(iter.hasNext()){
//					 String key = iter.next();
//					 if(MailTransform.subscribeList.get(key).equals(user)){
//						 MailTransform.subscribeList.remove(key);
//					 }
//				 }
//			}
//			MailTransform.subscribeList.put(response.getMetaInfo().getSubscriptionId(), (String)headers.get("authUser"));
//			
//		}
	}
	
}
